package com.int_tech.shebeiManager.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by liubochao on 2018/6/16.
 */
@Entity
@Table(name = "h_wendu")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class Wendu {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(length = 8)
    private Integer id;

    //设备id
    @Column(length = 64)
    private String shebeiId;

    //温度
    @Column(length = 64)
    private String wendu;

    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(updatable = false)
    private Date createTime;

    //修改时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    //状态(0，预定单；1，支付成功；2，未支付；3，订单关闭；4，转入退款；5，已撤销；6，支付失败)
    @Column(length = 4)
    private int status;
}
